//
//  ViewController.m
//  UI07_homeWork(halfOfSugar)
//
//  Created by Hanlingyu on 16/7/23.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.backgroundColor = [UIColor cyanColor];
    button.frame = CGRectMake(100, 100, 100, 50);
    [self.view addSubview:button];
    
    [button addTarget:self action:@selector(dismissModal:) forControlEvents:UIControlEventTouchUpInside];
    
    
}

- (void)dismissModal:(UIButton *)button {

    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
